//
//  EZAudioManager.h
//  RNRecorder
//
//  Created by GJS on 2018/12/6.
//  Copyright © 2018年 Facebook. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AudioRecordDelegate.h"
#import "AudioPlayDelegate.h"
#import "AudioManager.h"

@interface EZAudioManager : AudioManager

@property (nonatomic, copy) NSString *audioTmpPath;

+ (instancetype)shareInstance;

- (void)startRecordingWithDelegate:(id<AudioRecordDelegate>)delegate;

- (void)stopRecording;

- (void)cancelRecording;

- (void)pauseRecording;
- (void)resumeRecording;

- (void)requestRecordPermission:(void (^)(NSString *permission))callback;

- (void)startPlayingWithPath:(NSString *)aFilePath
                    delegate:(id<AudioPlayDelegate>)delegate
                    userinfo:(id)userinfo
             continuePlaying:(BOOL)continuePlaying;

//获取音频文件时长
- (NSTimeInterval)getAudioDuration;
//关闭整个播放Session
- (void)stopPlaying;

//仅仅停止当前文件的播放，不关闭Session
- (void)stopCurrentPlaying;
- (void)pauseCurrentPlaying;
- (void)resumeCurrentPlaying;

#pragma mark - static Method
//系统音量，只能由用户设置，分为16个等级，返回值范围为：0-1
+ (float)currentVolumn;

+ (NSInteger)currentVolumeLevel;

+ (BOOL)isHeadphone;

@end
